package file;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectInputStream;

import javax.rmi.CORBA.StubDelegate;

public class ReadObject {

	public static void main(String[] args) {
		File f=new File("e:\\oo.dat");
		try {
			ObjectInputStream ois=new ObjectInputStream(new FileInputStream(f));
			Demo11 s=(Demo11) ois.readObject();
			System.out.println(s.getName()+" "+s.getAge()+" "+s.getAddrress());
			ois.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		

	}

}
